<template>
    <div class="test">
        <img alt="Vue logo" src="@/assets/logo.png" />
        <span>多伦cli 3.0 移动端框架</span>
        <van-button type="info" @click="native">native</van-button>
    </div>
</template>

<script>
import { newWindow } from "@/utils/native";
import { queryData } from "@/api";
export default {
    mounted() {
        this.queryMock();
    },
    methods: {
        queryMock() {
            this.$http.post(queryData);
        },
        native() {
            console.log("测试原生能力用");
            newWindow({
                title: "native",
                url: "native"
            });
        }
    }
};
</script>

<style lang="scss" scoped>
.test {
    font-size: 18px;
    span {
        display: block;
        margin: 10vw 0;
    }
}
</style>